package core.schedule.snake.schedule.core;

import org.quartz.Job;

import core.schedule.snake.data.domain.DsfaTask;
import core.schedule.snake.schedule.job.DSFATaskJob;
import core.tool.log.log4j.EasyLogger;


public class QuartzUtil {
	
	
	public static void addJob(final DsfaTask dsfaTask,final TaskInfo taskInfo) {
		try {
			CronTriggerRunner cronTriggerRunner = new CronTriggerRunner();
			cronTriggerRunner.task(new DSFATaskJob(dsfaTask,taskInfo), dsfaTask.getExectStr());
			EasyLogger.debug("添加一个定时任务："+dsfaTask);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}
	
}
